<?php
$strSearch = $_POST["Search"];


include ("Connect_To_Database.php");
$strSQL = "SELECT * FROM giswebdatabase WHERE USER_ID LIKE '%" . $strSearch . "%' ORDER BY ID ASC ";
$objQuery = mysql_query($strSQL) or die("Error Query [" . $strSQL . "]");
?>
<table>                    
    <thead>
        <tr class="ui-bar-d">
            <th >ID</th>
            <th >USER_ID</th>
            <th >PASSWORD</th>
            <th >PID</th>
            <th >E-MAIL</th>
            <th >STATUS</th> 
            <th >EDIT</th>
            <th >DELETE</th>
        </tr>
    </thead>
    <tbody>
        <?
        while ($objResult = mysql_fetch_array($objQuery)) {
            ?>
            <tr class="ui-bar-c"  >

                <td  align="center" ><?= $objResult["ID"]; ?></td>
                <td  align="center" style="width: 250px;"><?= $objResult["USER_ID"]; ?></td>
                <td  align="center" style="width: 250px;"><?= $objResult["PASSWORD"]; ?></td>
                <td  align="center" style="width: 150px;"><div align="center"><?= $objResult["PID"]; ?></div></td>
                <td  align="center" style="width: 300px;"><div align="center"><?= $objResult["EMAIL"]; ?></div></td>
                <td  align="center" style="width: 200px;"><?= $objResult["STATUS"]; ?></td> 
                <td align="center"  style="width: 150px;"><a href="JavaScript:ShowEdit('<?= $objResult["ID"]; ?>', '<?= $objResult["USER_ID"]; ?>','<?= $objResult["PASSWORD"]; ?>','<?= $objResult["PID"]; ?>', '<?= $objResult["EMAIL"]; ?>','<?= $objResult["STATUS"]; ?>')">Edit</a></td>
                <!--td align="center" rel="AdminList" ><a href="#AdminEdit" class="action" onclick="AdminEdit()" data-rel="dialog">Edit</a></td-->

                <td align="center"  style="width: 150px;" ><a href="#" onclick="AreYouSure('<?= $objResult["ID"]; ?>','<?= $objResult["USER_ID"]; ?>')">Delete</a></td>
            </tr>
            <?
        }
        ?>

    </tbody>
</table> 
<br>
<div><button onclick=" AjaxListPage('1')" style="border-radius: 15px 15px 15px 15px;">กดที่นี้เพื่อกลับสู้หน้าหลัก</button></div>
<?
mysql_close($objConnect);
?>
